package com.ricky;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by baiguantao on 2017/10/31.
 *
 * http://localhost:50002/value
 * http://localhost:50002/refresh  post
 * management:
 security:
 enabled: false
 */
@RestController
@RefreshScope
public class ProfileController {
    @Value("${name}")
    private String value;

    @GetMapping("/value")
    public String getValue(){
        return value;
    }

}
